import request from '@/utils/request'

// 查询学生列表
export function recordListApi(query) {
    return request({
        url: '/student/guest',
        method: 'get',
        params: query
    })
}

export function addGuestRecodeApi(form) {
    return request({
        url: '/student/guest',
        method: 'post',
        data: form
    })
}

export function updateGuestRecodeApi(form) {
    return request({
        url: '/student/guest',
        method: 'put',
        data: form
    })
}

export function delGuestRecordApi(val) {
    return request({
        url: '/student/guest',
        method: 'delete',
        params: {
            "id": val
        }
    })
}
/**
 * 获取同一楼宇同学信息
 * @param {*} query 
 * @returns 
 */
export function getUserInfoApi(query) {
    return request({
        url: '/student/getBuildStudentInfo',
        method: 'get',
        params: query
    })
}
/**
 * 获取宿舍信息
 * 宿舍名称 + 宿舍组成人员
 * @param {*} query 
 * @returns 
 */
export function getDormInfoApi() {
    return request({
        url: '/student/dorm',
        method: 'get'
    })
}

export function getdormPropertyInfoApi() {
    return request({
        url: '/student/dormProperty',
        method: 'get'
    })
}

export function adddormPropertyMainTainApi(form) {
    return request({
        url: '/student/dormProperty',
        method: 'post',
        data: form
    })
}
/**
 * 获取宿舍维修记录
 * @param {*} form 
 * @returns 
 */
export function getDormPropertyMainTainRecordApi(form) {
    return request({
        url: '/student/dormProperty/maintainRecord',
        method: 'get'
    })
}
/**
 * 获取水电费信息
 * @param {*} query 
 * @returns 
 */
export function getWaterElectricityInfoApi(query) {
    return request({
        url: '/student/waterElectricity',
        method: 'get',
        params: query
    })
}
/**
 * 缴费 ==>水电费
 * @param {*} val 
 * @returns 
 */
export function startPayApi(val) {
    return request({
        url: '/student/waterElectricity',
        method: 'put',
        params: {
            "id": val
        }
    })
}
